package com.hkd.cya.状态模式;

public class GreenState extends AbstractState {

    public GreenState(Student student) {

        super(student);

        stateName="绿色";

    }

    @Override

    public void checkState() {

        if(student.getAccountPoints()<=100){

            //补全代码8
                student.setState(new BlueState(student));


        }

    }

    @Override

    public void recommend() {

        System.out.println(student.getStuName()+"同学，恭喜你具有保研资格！！！！");

    }

}

